<?php
/**
 * @purpose: 对“通知”类型中子类型为12(graph_plaintext)的编码与解码文件
 * @author: Mandel Woo <wuzhijian@snda.com>

 * @memo: 参阅母板文件
 */
require_once(dirname(__FILE__)."/../../../models/user/UCModUserInfo.php");


function msg_notice_type12_encoder() {
	$fields = array("content");

	foreach($fields as $k => $v) {
		eval("\${$v}=func_get_arg($k);");
	}


	return $content;
}

function msg_notice_type12_decoder() {
	$fields = array("id","receiverid","content","createTime","changeFlag","fmt");

	foreach($fields as $k => $v) {
		eval("\${$v}=func_get_arg($k);");
	}


	#$content;


	if ($fmt == 'line') {
		return utf_substr(htmlspecialchars($content), 50);

	} else if ($fmt == 'box') {
		$html = htmlspecialchars($content);

		return '<div class="font14">' . $html . '</div>';

	} else {
		return '';
	}
}

